Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Spec Namespace / IPdfDictExt Class / TryGet Method / TryGet<T>(IPdfDict,PdfName,T,Boolean) Method
The current dictionary.
The key identifying the value.
OUT: The value.
Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if value at the specified index can't be converted to the T.

In This Topic
    TryGet<T>(IPdfDict,PdfName,T,Boolean) Method
    In This Topic
    Tries to get the value associated with the specified key, if the value does not exist or cannot be converted to a T returns false.
    Syntax
    'Declaration
     
    Public Overloads Shared Function TryGet(Of T As IPdfObject)( _
       ByVal dict As IPdfDict, _
       ByVal key As PdfName, _
       ByRef value As T, _
       Optional ByVal addWarning As System.Boolean _
    ) As System.Boolean
    public static System.bool TryGet<T>( 
       IPdfDict dict,
       PdfName key,
       out T value,
       System.bool addWarning
    )
    where T: IPdfObject

    Parameters

    dict
    The current dictionary.
    key
    The key identifying the value.
    value
    OUT: The value.
    addWarning
    Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if value at the specified index can't be converted to the T.

    Type Parameters

    T

    Return Value

    true if value exists, false otherwise.
    See Also